
import {
    legacy_createStore as createStore,
    combineReducers,
    applyMiddleware,
    compose
} from 'redux';

// 引入redux-thunk
import reduxthunk from 'redux-thunk'

//导入 shopReducer
import shopReducer from './modules/shop';
// 导入userReducer 
import userReducer from './modules/user';

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
    combineReducers({
        shop: shopReducer,
        user: userReducer
    }),
    composeEnhancers(applyMiddleware(reduxthunk))
);

export default store


